<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class StudentPaperRecord extends Model
{
    protected $fillable = ['student_id', 'course_id', 'paper_id', 'score', 'status', 'finished_at'];
    
    // 禁用自动时间戳（表中没有 created_at 和 updated_at 字段）
    public $timestamps = false;

    // 关联课程
    public function course()
    {
        return $this->belongsTo(Course::class);
    }

    // 关联试卷
    public function paper()
    {
        return $this->belongsTo(Paper::class);
    }
}
